home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_ambbridges2.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  73 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_AmbBridges2.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.     message     pulse
  14.  
  15.     thing        soundPos0        nolink
  16.     
  17.     sector      start_Amb1      linkID=1
  18.     sector      start_Amb2      linkID=1
  19.     sector      start_Amb3      linkID=1
  20.     
  21.     sector      stop_Amb1       linkID=0
  22.     sector      stop_Amb2       linkID=0
  23.     sector      stop_Amb3       linkID=0
  24.  
  25.     sound        ambient0=tem_bridge_b.wav   local
  26.     sound        ambient1=tem_bridge_c.wav   local
  27.     
  28.     flex        vol=1.0
  29.     flex        minDist=5.0
  30.     flex        maxDist=12.0
  31.     
  32.     int         randNum=0       local
  33.     int         soundsOn=0      local
  34.     
  35. end
  36.  
  37. # ========================================================================================
  38.  
  39. code
  40.  
  41. entered:
  42.  
  43.     if((GetSenderID() == 1) && (soundsOn == 0))
  44.     {
  45.         soundsOn = 1;
  46.         setpulse(2.0);
  47.     }
  48.     
  49.     if(GetSenderID() == 0)
  50.     {
  51.         soundsOn = 0;
  52.         SetPulse(0.0);
  53.     }
  54.     
  55.     return;
  56.  
  57. # ========================================================================================
  58.  
  59. pulse:
  60.  
  61.     randNum = RandBetween(1, 5);
  62.     
  63.     if(randNum == 1)
  64.     {
  65.         PlaySoundThing(ambient0[RandBetween(0, 1)], soundPos0, vol, minDist, maxDist, 0);
  66.     }
  67.     
  68.     return;
  69.  
  70. # ========================================================================================
  71.  
  72. end
  73.